package nku.csc360;

public class Main {

    public static void main(String... Args) {
    
    	
    	//Creating 5 accounts
    	Account[] currentAccounts = new Account[5];
		currentAccounts[0] = new Checking(1, 759, 12,  new java.util.Date());
		System.out.println(currentAccounts[0]);
		currentAccounts[1] = new Checking(2,745, 6, new java.util.Date());
		System.out.println(currentAccounts[1]);
		currentAccounts[2] = new Saving(3,967, 7, new java.util.Date());
		System.out.println(currentAccounts[2]);
		currentAccounts[3] = new Saving(4,563, 5, new java.util.Date());
		System.out.println(currentAccounts[3]);
		currentAccounts[4] = new Saving(5,878, 4, new java.util.Date());
		System.out.println(currentAccounts[4]);
		
		//Counter for each month
		int count1 = 3;
		
		//Random operations for each month... 
		while(count1 > 0){
			//Sample account withdrawals and deposits
			currentAccounts[2].withdraw(7);
			currentAccounts[2].withdraw(1);
			currentAccounts[2].withdraw(2);
			currentAccounts[2].withdraw(7);
			currentAccounts[2].deposit(1);
			currentAccounts[2].withdraw(2);
			currentAccounts[2].withdraw(2);
			currentAccounts[2].withdraw(1);
			currentAccounts[2].deposit(2);
			currentAccounts[2].withdraw(2);
			currentAccounts[2].withdraw(3);
			currentAccounts[2].withdraw(4);
			currentAccounts[2].deposit(2);
			currentAccounts[2].withdraw(4);
			currentAccounts[4].withdraw(75);
			currentAccounts[0].withdraw(155);
			currentAccounts[1].withdraw(265);
			currentAccounts[2].deposit(73);
			currentAccounts[3].withdraw(134);
			currentAccounts[4].withdraw(253);
			currentAccounts[0].withdraw(35);
			currentAccounts[1].withdraw(133);
			currentAccounts[2].withdraw(252);
			currentAccounts[3].deposit(23);
			currentAccounts[4].withdraw(453);
			currentAccounts[0].withdraw(234);
			currentAccounts[1].withdraw(236);
			currentAccounts[2].withdraw(43);
			currentAccounts[3].withdraw(75);
			currentAccounts[4].deposit(155);
			currentAccounts[0].withdraw(265);
			currentAccounts[1].withdraw(73);
			currentAccounts[2].withdraw(134);
			currentAccounts[3].deposit(253);
			currentAccounts[4].withdraw(35);
			currentAccounts[0].withdraw(133);
			currentAccounts[1].deposit(252);
			currentAccounts[2].withdraw(23);
			currentAccounts[3].withdraw(453);
			currentAccounts[4].withdraw(234);
			currentAccounts[0].withdraw(236);
			currentAccounts[1].withdraw(43);		
			Account.clears(currentAccounts);
			count1--;
		}   
    }
}